import java.util.Scanner;

class Main {

	
	public static void main(String[] args) {
		int a[] = {4, 3, 2, 1};
		for (int i = 0; i < a.length; i++) {
			int min = a[i];
			int minPos = i;
			for (int j = i+1; j < a.length; j++) {
				if (a[j] < min) {
					min = a[j];
					minPos = j;
				}
			}

			int t;
			t = a[i];
			a[i] = a[minPos];
			a[minPos] = t;
		}
		
		for (int i = 0; i < a.length; i++) {
			System.out.println(a[i]);
			
		}		
		
	}
}
